import React, { Component } from 'react';

export class CounterClass extends Component {
  state = {
    count: 0,
  };

  render() {
    console.log('render');
    return (
      <div>
        <h1>{this.state.count}</h1>
        <button onClick={() => this.setState({ count: 20 })}>+1</button>
      </div>
    );
  }
}
